Skip to content

fix: add pessimistic lock when fetching next qs batch and marking failed#721

Merged
deer-wmde merged 2 commits into
mainfrom
fr/pessimistic-lock
Jan 19, 2024
Merged

fix: add pessimistic lock when fetching next qs batch and marking failed#721
deer-wmde merged 2 commits into
mainfrom
fr/pessimistic-lock

Conversation

@m90

@m90 m90 commented Jan 15, 2024

Copy link
Copy Markdown
Contributor

@m90
m90 force-pushed the fr/pessimistic-lock branch 2 times, most recently from 7f9b7c3 to e179804 Compare January 15, 2024 16:07
Comment thread app/Jobs/CreateQueryserviceBatchesJob.php
@deer-wmde

Copy link
Copy Markdown
Contributor

Generally this looks great to me, I'm just still lacking a bit database knowledge and am curious where the unlocking does happen again, is it something Laravel takes care of in its connection teardown or something or is it even the DB itself that does it? Just asking out of interest and trying to see if there's footgun potential (but I don't think so actually)

@m90

m90 commented Jan 18, 2024

Copy link
Copy Markdown
Contributor Author

Generally this looks great to me, I'm just still lacking a bit database knowledge and am curious where the unlocking does happen again, is it something Laravel takes care of in its connection teardown or something or is it even the DB itself that does it? Just asking out of interest and trying to see if there's footgun potential (but I don't think so actually)

From what I understand the END TRANSACTION statement will unlock everything that was locked within the transaction.

@m90
m90 force-pushed the fr/pessimistic-lock branch from e179804 to 2e9e831 Compare January 18, 2024 14:51
@deer-wmde
deer-wmde merged commit fce1584 into main Jan 19, 2024
@deer-wmde
deer-wmde deleted the fr/pessimistic-lock branch January 19, 2024 14:02
@deer-wmde deer-wmde mentioned this pull request Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants